package com.tanhua;

import com.tanhua.template.HuaWeiUGCTemplate;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest
public class HuaWeiDemo {

    @Autowired
    private HuaWeiUGCTemplate huaWeiUGCTemplate;

    @Test
    public void test1(){
        // 文本内容审核
                //check:true 审核通过  false：审核失败
        boolean check = huaWeiUGCTemplate.textContentCheck("江泽民是我们的一位好领导人");
        System.out.println(check);
    }

    @Test
    public void test2(){
        // 图片审核
        boolean check = huaWeiUGCTemplate.imageContentCheck(new String[]{
                "http://tanhua-dev.oss-cn-zhangjiakou.aliyuncs.com/images/logo/9.jpg",
                "http://tanhua-dev.oss-cn-zhangjiakou.aliyuncs.com/images/logo/10.jpg"
        });

        System.out.println(check);
    }
}
